home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / lcppb.zip / README.TXT < prev   
Text File  |  1991-07-08  |  5KB  |  153 lines

  1. -----------------------------------------
  2. Learning C++ (1991-SAMS) 
  3. by Tom Swan (CIS ID-73627,3241 MCI-TSWAN)
  4. Borland C++ 2.0 Conversion Kit
  5. Date: 07/08/1991
  6. -----------------------------------------
  7.  
  8. (C) 1991 by Tom Swan. All rights reserved.
  9.  
  10. These notes explain how to install and compile the Borland C++ source
  11. code files for my book Learning C++, published by SAMS. Although the
  12. book comes complete with its own C++ compiler (supplied by Zortech),
  13. many people have requested a conversion kit for Borland C++ 2.0.
  14. There is no charge for these conversions, and you may freely
  15. distribute the LCPPB.ZIP file in its original form. 
  16.  
  17. The listings are compressed and stored in "ZIP" files. To use them
  18. along with Learning C++, you'll have to:
  19.  
  20. o Create a few subdirectories
  21. o Unpack various .ZIP files using PKUNZIP or a similar utility
  22. o Run Borland's Make utility to compile the programs
  23.  
  24. Except for common library routines, all programs are supplied in text
  25. form only. Before you can run the programs, you must compile them
  26. with Borland C++ version 2.0. Here's how:
  27.  
  28.  
  29. UNPACKING THE ZIP FILES
  30. -----------------------
  31.  
  32. Make a new directory named LCPPB on any drive. The directory must be
  33. named LCPPB and must be at the root (outer) level. (See "MODIFYING
  34. THE MAKE FILES" if you want to use a different directory.) These notes
  35. assume you are using drive C:, but you may replace C: with any drive
  36. letter. To create the necessary directories, enter these commands:
  37.  
  38. c:
  39. cd \
  40. md lcppb
  41. cd lcppb
  42. md lib
  43. md answers
  44. md source
  45.  
  46. Next, copy LCPPB.ZIP to \LCPPB. To unpack the ZIP files, use PKUNZIP
  47. or another similar utility, and enter these commands:
  48.  
  49. c:
  50. cd \lcppb
  51. pkunzip lcppb
  52. pkunzip lcpplib.zip lib
  53. pkunzip lcppans.zip answers
  54. pkunzip lcpp0?.zip source
  55. del *.zip
  56.  
  57. You now have three subdirectories: \LCPPB\SOURCE contains all of the
  58. listings from chapters 1, 2, 3, 4, 5, 8, and 9. \LCPPB\LIB contains
  59. common library files and all of the listings from chapters 6 and 7.
  60. \LCPPB\ANSWERS contains the listings for the book's Answer's to
  61. Questions and Exercises.
  62.  
  63. Next, you'll change to each of the three subdirectories and compile
  64. the programs. Make sure the command-line compiler BCC.EXE, the linker
  65. TLINK.EXE, the library manager TLIB.EXE, and the Make utility
  66. MAKE.EXE are on the system PATH. Then enter the following commands to
  67. compile the listings:
  68.  
  69. c:
  70. cd \lcppb\lib
  71. make -fmakelib
  72. cd ..\answers
  73. make -fmakeans
  74. cd ..\source
  75. make -fmakec01
  76. make -fmakec02
  77. make -fmakec03
  78. make -fmakec04
  79. make -fmakec05
  80. make -fmakec08
  81. make -fmakec09
  82.  
  83. The MAKE files for chapters 1-5 and 8-9 are stored separately so you
  84. can copy or delete files for one chapter without affecting files for
  85. other chapters.
  86.  
  87.  
  88. MODIFYING THE MAKE FILES
  89. ------------------------
  90.  
  91. If you set up your directories as described above, you shouldn't have
  92. to modify the MAKE files. But if you want to use a different
  93. directory structure, you'll have to make some changes. First, load
  94. the appropriate MAKE file into your editor, then find the line that
  95. reads:
  96.  
  97. lib=\lcppb\lib
  98.  
  99. Change \lcppb\lib to the path where you store the files unpacked from
  100. LCPPLIB.ZIP. The path may also include a drive letter. Make the
  101. identical change to each MAKE file.
  102.  
  103. Except for the files in \LCPPB\LIB, other files may be stored in any
  104. directory or directories without requiring any changes to the MAKE
  105. files.
  106.  
  107.  
  108. CHANGES TO LISTINGS
  109. -------------------
  110.  
  111. I made only the minimum number of changes required to compile the
  112. listings with Borland C++. In most programs, I preceded the original
  113. programming with // comment symbols so you can easily compare the
  114. differences between the Zortech C++ and Borland C++ 2.0
  115. implementations. Where I made extensive modifications (and in the
  116. answers to exercises), I did not retain the original code.
  117.  
  118. Most changes were minor--a new #include declaration here or a slight
  119. alteration to syntax there. Some programs, especially those that read
  120. DOS directories, required more extensive work.
  121.  
  122. A few name changes where unavoidable, the most significant being the
  123. window class which I had to rename cwindow.
  124.  
  125. Since the Zortech C++ compiler supplied to me uses the older STREAM
  126. implementation, it was necessary to replace <stream.hpp> with
  127. <iostream.h> and to make other related modifications. 
  128.  
  129.  
  130. ABOUT DISP.H and DISP.CPP
  131. -------------------------
  132.  
  133. Module DISP.CPP and its header file DISP.H are partial replacements
  134. for the DISP (direct-video display) module in Zortech C++. This
  135. module is not in the book. The replacement module duplicates some,
  136. but not all, of the functions in the Zortech version. I converted
  137. only those functions, variables, and constants needed to compile the
  138. book's listings.
  139.  
  140. In Zortech C++, functions disp_peekbox() and disp_pokebox() declare
  141. their first parameters as type unsigned *. In the replacement module,
  142. these function parameters are declared as void far *. Other
  143. parameters in other functions are identical in both versions.
  144.  
  145.  
  146. COMMENTS
  147. --------
  148.  
  149. Please send any comments to me via Compuserve or MCI Mail to the
  150. addresses at the beginning of this file.
  151.  
  152. Enjoy!
  153.